require 'faker'

PUBLISHERS = ["ABU", "Vida", "Mundo Cristao", "Contemporanea"]
CATEGORIES = ["Vida Crista", "Apologetica", "Documentario", "Teologia", "Teologia Escatologia"]

1.upto(100).each do |m|
  book = Book.new
  book.title = Faker::Lorem.words(3).join(' ').capitalize
  book.author = Faker::Name.name
  book.publisher = PUBLISHERS.choice
  book.category = CATEGORIES.choice
  book.first_edition_year = (1950..2010).to_a.choice
  book.copy_year = (1950..2010).to_a.choice
  book.quantity = (1..5).to_a.choice
  book.save
end
